﻿# -*- coding: utf-8 -*-
list_s = ['Beautiful', 'is', 'better', 'than', 'ugly', 'Explicit', 'is', 'better', 'than', 'implicit']
l = {}
for i in list_s:
    if i in l:
        l[i] += 1
    else:
        l[i] = 1
for j in l:
    print(j, l[j])